| EXAMPLE
As shown when the page opened. This
script will encounter issues if placed on the same page as the
destination page (such as we have done on this page). When
implementing this we recommend you place this on a page of its own
and direct the correct password users to another page.
Keep in mind that this password is
not a recommended method for sites that need to be 100% secure as
experienced users can easily bypass this.
If you are looking for a 100% secure
method of implementing passwords you will need to create a .htaccess
file on the server containing the security information. Additional
information on how to do this can be found through your ISP (if
supported).
SOURCE
CODE
<script
language="Javascript">
<!--
var password = "please" var x =
prompt("Enter in the password "," ") if (x.toLowerCase() ==
password) { alert("Come right in \n \n You've entered in the
right password") location = "index.htm" }
else { location =
"bad.htm" }
//-->
</script> |